package com.guodefu.demo.service;

import com.guodefu.demo.domain.DictionaryDO;
import com.guodefu.demo.dto.DictionaryDTO;

import java.util.List;

public interface DictionaryService{

    DictionaryDO getOneById(Long id);

    DictionaryDO getOneByTypeAndCode(String type, String code);

    DictionaryDO insert(DictionaryDTO dict);

    DictionaryDO cacheByTypeAndCode(DictionaryDO dict);

    DictionaryDO update(Long id, DictionaryDTO dict);

    int delete(DictionaryDO dict);

    List<DictionaryDO> getListByType(String type);

    List<DictionaryDO> getByNameOrType(String name, String type);

    List<DictionaryDO> list();

    DictionaryDO cacheById(DictionaryDO dict);
}
